<!DOCTYPE html>
<html lang="zh-cmn-Hans">

<head>
    <meta charset="UTF-8">
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
    <meta content="yes" name="apple-mobile-web-app-capable" />
    <meta content="black" name="apple-mobile-web-app-status-bar-style" />
    <meta name="format-detection" content="telephone=no" />
    <link rel="icon" type="image/png" href="../../static/favicon.ico" />

    <!-- 样式 -->
    <link rel="stylesheet" href="../../static/mobile/default/css/layout.css?v=2" />
    <link rel="stylesheet" href="../../static/assets/css/zpui.css" />
    <link rel="stylesheet" href="../../static/assets/css/all.css" />
    <link rel="stylesheet" href="../../static/mobile/default/css/my.css" />

    <style>
        .header .header-right a img {
            width: .3733rem;
            height: .3733rem;
        }

        .res-header{
            height: 1.42rem;
            /* background-color: pink; */
            text-align: center;
            padding-top: .1333rem;
        }

        .res-header img{
            width: .5rem;
            height: .5rem;
            border-radius: 50%;
            border: .0133rem solid #ccc;
            margin: 0 auto;
        }

        .res-header h4{
            margin-top: .1333rem;
            font-size: .2667rem;
        }

        .res-header p{
            margin-top: .0667rem;
            font-size: .2rem;
            color: #9d9d9d;
        }

        .res-nav{
            height: 1.0667rem;
            line-height: 1.0667rem;
            background-color: #fff;
        }

        .res-nav ul{
            display: flex;
            justify-content: space-around;
            align-items:center;
            height: 1.0667rem;
            line-height: 1.0667rem;
        }

        .res-nav ul li{
            width: .6667rem;
            height: .6667rem;
        }

        .res-nav ul li img{
            width: .6667rem;
            height: .6667rem;
        }

        .res-cont .info ul li{
            height: .8rem;
            background-color: #ed88b2;
            color: #fdf9fe;
            border-bottom: .0133rem solid #a95476;
            font-size: .2rem;
            padding-left: .2667rem;
            padding-top: .0667rem;
        }

        .res-cont .info .last{
            background-color: #727071;
        }
    </style>

    <title>会员个人档案 - 孝邻会</title>
</head>

<body>
    <!-- 整体页面部分 -->
    <div class="page">
        <!-- 页面头部 -->
        <div class="page-hd">
            <div class="header bor-1px-b">
                <div class="header-left">
                    <a href="javascript:history.go(-1)" class="left-arrow"></a>
                </div>
                <div class="header-title">会员个人档案 - 孝邻会</div>
                <div class="header-right">
                    <a href="#">
                        <img src="../../static/assets/images/res/13.png" alt="">
                    </a>
                </div>
            </div>
        </div>

        <!-- 页面内容-->
        <div class="page-bd">
            <div class="res-header">
                <img src="../../static/mobile/default/images/defheadimg.jpg" alt="" />
                <h4></h4>
<!--                <p></p>-->
            </div>
            <div class="res-nav">
                <ul>
                    <li>
                        <a id="callTel" href="#"><img src="../../static/assets/images/res/25.png" alt=""/></a>
                    </li>
                    <li>
                        <a id="callSms" href="#"><img src="../../static/assets/images/res/26.png" alt=""/></a>
                    </li>
                    <li>
                        <a href="#"><img src="../../static/assets/images/res/27.png" alt=""/></a>
                    </li>
                    <li>
                        <a href="#"><img src="../../static/assets/images/res/28.png" alt=""/></a>
                    </li>
                    <li>
                        <a href="#"><img src="../../static/assets/images/res/31.png" alt=""/></a>
                    </li>
                </ul>
            </div>
            <div class="res-cont">

                <div class="info">
                    <ul>
                        <li>
                            <p>微信号码</p>
                            <h3 class="wx"></h3>
                        </li>
                        <li>
                            <p>手机号码</p>
                            <h3 class="phone"></h3>
                        </li>
                        <li>
                            <p>所在行业</p>
                            <h3 class="keywords"></h3>
                        </li>
                        <li>
                            <p>公司名称</p>
                            <h3 class="comp_name"></h3>
                        </li>
                        <li>
                            <p>职务</p>
                            <h3 class="position"></h3>
                        </li>
                        <li>
                            <p>公司地址</p>
                            <h3 class="comp_addr"></h3>
                        </li>
                        <li>
                            <p>行业优势</p>
                            <h3 class="ind_advance"></h3>
                        </li>
                        <li>
                            <p>可提供资源</p>
                            <h3 class="supply_res"></h3>
                        </li>
                        <li>
                            <p>需要引荐资源</p>
                            <h3 class="need_res"></h3>
                        </li>
                        <li class="last">
                            <h1 class="level"></h1>
                        </li>
                    </ul>
                </div>

            </div>
            

        </div>
        <!-- 版权 -->
        <div class="copyright">
            Copyright © 达漂亮<br>
        </div>

    </div>

    <!-- alert弹窗部分 -->
    <div class="alertBox">
        <div class="alertBG"></div>
        <div class="alert">
            <div class="text fs30 color_3 bor_b">

            </div>
            <!-- 单按钮 -->
            <div class="button fs32 fw_b color_r">
                知道了
            </div>
            <!-- 双按钮 -->
            <div class="buttonBox fs32 fw_b">
                <span class="color_9 bor_r cancel">取消</span>
                <span class="color_r confirm">确定</span>
            </div>
        </div>
    </div>

    <!-- js -->
    <script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
    <script src="../../static/js/jquery/jquery/2.1.4/jquery.min.js"></script>
    <script src="../../static/mobile/default/js/page.js?v=1"></script>
    <script src="../../static/js/art-template.js"></script>
    <script src="../../static/mobile/default/js/lib/fastclick.js"></script>
    <script src="../../static/assets/js/lib/jquery-2.1.4.js"></script>
    <script src="../../static/assets/js/jquery-weui.min.js"></script>
    <script src="../../static/assets/js/lib/fastclick.js"></script>

    <script src="../../static/js/jquery/jquery.cookie.js"></script>
    <script src="../../static/js/jquery/lazyload/jquery.lazyload.js"></script>

    <!-- 页面js部分 -->
    <script>
        function getUrlParam(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
            var r = window.location.search.substr(1).match(reg); //匹配目标参数
            if (r != null) return unescape(r[2]);
            return null; //返回参数值
        }

        var userId = getUrlParam("userId");

        function getUserDetail() {
            $.ajax({
                url: 'https://mp.jianguoes.com/api/mp/getUserDetail', // 跳转到 action
                data: {
                    userId: userId
                },
                type: 'get',
                headers: {
                    'token': $.cookie('code')
                },
                dataType: 'json',
                success: function(res) {
                    console.log(res);
                    if (res.errno != 0) {
                        _alert(res.errmsg);
                        return false;
                    }
                    var concent = ''

                    $('.res-header').find('img').attr('src', res.data.avatar);
                    $('.res-header').find('h4').text(res.data.realName);
                    // $('.res-header').find('p').text(res.data.companyName);

                    $('.wx').text(res.data.nickname);
                    var tel = res.data.mobile;
                    if(tel && tel.length == 11){
                        $('.phone').text(tel.substr(0, 3) + "****" + tel.substr(7));
                    }

                    $('.keywords').text(res.data.keywords);
                    $('.comp_name').text(res.data.compName);
                    $('.position').text(res.data.position);
                    $('.comp_addr').text(res.data.compAddr);
                    $('.ind_advance').text(res.data.indAdvance);
                    $('.supply_res').text(res.data.supplyRes);
                    $('.need_res').text(res.data.needRes);

                    $('.level').text(res.data.levelName);

                    //需要控制权限
                    // $("#callTel").attr("href", "tel:"+res.data.mobile);
                    // $("#callSms").attr("href", "sms:"+res.data.mobile);
                },
                error: function() {}
            });
        }
    </script>

    <!-- 启动加载 -->
    <script>
        $(function() {
            FastClick.attach(document.body);

            // 获取需求详情数据
            getUserDetail();

            $("#sendJoin").click(function() {
                window.location.href = "joincase.html?caseId=" + caseId;
            });

        });
    </script>
</body>

</html>